from flask import Flask, session
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from info import creat_app,db
from config import DevelopmentConfig,ProductionConfig
from info import set_log

app = creat_app(DevelopmentConfig)
# set_log(DevelopmentConfig)
# 创建manage对象和程序实例关联
manager = Manager(app)

# 创建迁移对象
Migrate(app, db)
manager.add_command('db', MigrateCommand)


if __name__ == '__main__':
    manager.run()
